    //
//  DetailTabController.m
//  NBANews
//
//  Created by Liccon Chang on 11-1-26.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "DetailTabController.h"
#import "StatisticsController.h"
#import "IntelligenceController.h"
#import "OddsController.h"
#import "TextLiveController.h"

@implementation DetailTabController

- (id)initWithGameInfo:(GameInfo*) aInfo{
	self = [super init];
	if (self) {
		StatisticsController* Statistics = [[StatisticsController alloc] initWithGameInfo:aInfo];
		Statistics.title = @"统计";
		
		OddsController* Odds = [[OddsController alloc] initWithGameInfo:aInfo];
		Odds.title = @"积分";
		
		IntelligenceController* Intelligence = [[IntelligenceController alloc] initWithGameInfo:aInfo];
		Intelligence.title = @"情报";
		
		TextLiveController* TextLive = [[TextLiveController alloc] initWithGameInfo:aInfo];
		TextLive.title = @"直播";
		
		self.viewControllers = [NSArray arrayWithObjects:Statistics, Odds,Intelligence,TextLive,nil];
		
		[Statistics release];
		[Odds release];
		[Intelligence release];
		[TextLive release];
	}
	return self;
}

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/

// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations.
    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc. that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


@end
